package _24define;

public class Demo2 {
    public static void main(String[] args) {
        Thread t1 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println ("线程T1正在执行");
            }
        });
        t1.start ();

        try {
            t1.join ();
        } catch (InterruptedException e) {
            e.printStackTrace ();
        }

        Thread t2 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println ("线程T2正在执行");
            }
        });
        t2.start ();

        try {
            t2.join ();
        } catch (InterruptedException e) {
            e.printStackTrace ();
        }

        Thread t3 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println ("线程T3正在执行");
            }
        });
        t3.start ();

        try {
            t3.join ();
        } catch (InterruptedException e) {
            e.printStackTrace ();
        }
    }
}
